<div class="wrap">					
	<div class="headings"><h1><span>Upload New Image</span></h1></div>
					
	<form action="" id="imageform">
		<input type="hidden" value="<%= uri %>" name="uri" id="uri"/>
		<input type="hidden" value="<%= type %>" name="type" />
		 <p>
            <label for="name">Image Name</label>
            <input class="input-small" type="text" value="<%= name %>" name="name" id="name" placeholder="Image1"/>
        </p>
        <p>
                            <label for="selectbox">Experiment </label>
                            <select name="experiment_id" id="selectbox" <% if(edit){ %>disabled="disabled"  <%} %> >
                                    <option value=""  >Select a Experiment</option>
                                    <% if(experiments != null){
                                    	
                                    	for(i=0; i<experiments.length; i++) { 
                                    		items=experiments[i];
                                    		
                                    	%>
                                    	<option value="<%= experiments[i].id %>" <% if(experiments[i].id===experiment){ %><%= "selected" %><% }%> ><%= experiments[i].name %></option>
                                    <% }
                                    } %>
                                    
                            </select>
        </p>
        <p>
            <label for="description">Image Description</label>
            <textarea name="description" id="description" cols="60" rows="15" placeholder="Image Description"><%= description %></textarea>
        </p>
        <%if (edit) { %>
        <p>
            Click here to <a href="<%= downloadLink %>">Download</a> Image.
        </p>
        <% } %>
        
		 <p><% if(edit) { %><input class="button shadow-dark" style="width:200px;" name="updateImg" type="button" value="Update Image"/>
		 	<% } else { %> 
            <input class="button shadow-dark" style="width:200px;" name="generateLink" type="button" value="Generate Upload Link"/>
        	<% } %>
        </p>
	</form>	
	<div id="uploadLink">
		
	</div>
</div>
